// 该文件用于封装请求
import http from "./http";

// 以下这些请求都会被mockjs拦截，返回其中的模拟数据

// 获取导航数据的请求
export const reqNavList = ()=> http.get('/nav/navList')

// 获取首页基础数据(非图表数据)
export const reqHomeBaseData = ()=> http.get('/home/baseData')

// 获取首页基础数据(非图表数据)
export const reqHomeChartsData = ()=> http.get('/home/chartsData')

// 获取用户页的userList
export const reqUserList = (params={})=> http({url:'/user/userList',method:'GET',params})

// 添加用户
export const reqAddUser = (data) => http({url:'/user/addUser',method:'POST',data})

// 删除用户 
export const reqDeleteUser = (data) => http({url:`/user/deleteUser`,method:'POST',data})

// 更新用户
export const reqUpdateUser = (data) => http({url:'/user/edit',method:'POST',data})

// 用户登录
export const reqLogin = (data) => http.post('/api/permission/getMenu',data)